package com.financing.wap.dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.financing.wap.dto.MessageJpushDTO;
import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IClientDao;
import com.financing.wap.dao.IMessageJpushUserPhoneAliasDao;
import com.financing.wap.dto.ClientUserBaseDTO;
import com.financing.wap.dto.CorpClientUserBaseDTO;
import com.financing.wap.dto.MessageJpushUserPhoneAliasDTO;
import com.financing.wap.vo.QueryClientUserVo;

@Repository("messageJpushUserPhoneAliasDao")
public class MessageJpushUserPhoneAliasDaoImpl extends BaseDaoImpl<MessageJpushUserPhoneAliasDTO, java.lang.Integer> implements IMessageJpushUserPhoneAliasDao {

	
	@Override
	public Class<MessageJpushUserPhoneAliasDTO> getEntityClass() {
		return MessageJpushUserPhoneAliasDTO.class;
	}

	@Override
	public MessageJpushUserPhoneAliasDTO queryMessageJpushUserPhoneAlias(String fpUserId) throws SQLException {
		return (MessageJpushUserPhoneAliasDTO) this.sqlMapClientTemplate.queryForObject(sqlName.queryMessageJpushUserPhoneAlias, fpUserId);
	}

	@Override
	public int updateMessageJpushUserPhoneAlias(MessageJpushUserPhoneAliasDTO dto) throws SQLException {
		return this.sqlMapClientTemplate.update(sqlName.updateMessageJpushUserPhoneAlias, dto);
	}

	@Override
	public int addMessageJpushUserPhoneAlias(MessageJpushUserPhoneAliasDTO dto) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.addMessageJpushUserPhoneAlias, dto);
	}

	@Override
	public MessageJpushUserPhoneAliasDTO queryMessageJpushUserPhoneAlias(MessageJpushUserPhoneAliasDTO dto)
			throws SQLException {
		return  (MessageJpushUserPhoneAliasDTO) this.sqlMapClientTemplate.queryForObject(sqlName.queryMessageJpushUserPhoneAliasInfo, dto);
	}
	@Override
	public int addJpushMessage(MessageJpushDTO dto) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.addMessageJpush, dto);
	}
}
